#include "StdAfx.h"
#include "splat.h"
#include "defender.h"
#include "machine/williamsmachine.h"

static InputPort Port1 =
	{
		{
		{"Up",			I2_UP,		0x01,	I_HIGH},
		{"Down",			I2_DOWN,		0x02,	I_HIGH},
		{"Left",			I2_LEFT,		0x04,	I_HIGH},
		{"Right",		I2_RIGHT,	0x08,	I_HIGH},
		{"Start 1",		I_START1,	0x10,	I_HIGH},
		{"Start 2",		I_START2,	0x20,	I_HIGH},
		{"Up2",			I2_UP2,		0x40,	I_HIGH},
		{"Down2",		I2_DOWN2,	0x80,	I_HIGH},
		}
	};

static InputPort Port2 =
	{
		{
		{"Left2",		I2_LEFT2,	0x01,	I_HIGH},
		{"Right2",		I2_RIGHT2,	0x02,	I_HIGH},
		{"Unknown",		0,				0x04,	I_HIGH},
		{"Unknown",		0,				0x08,	I_HIGH},
		{"Unknown",		0,				0x10,	I_HIGH},
		{"Unknown",		0,				0x20,	I_HIGH},
		{"Unknown",		0,				0x40,	I_HIGH},
		{"Unknown",		0,				0x80,	I_HIGH},
		}
	};

static InputPort Port4 =
	{
		{
		{"Up",			I_UP,			0x01,	I_HIGH},
		{"Down",			I_DOWN,		0x02,	I_HIGH},
		{"Left",			I_LEFT,		0x04,	I_HIGH},
		{"Right",		I_RIGHT,		0x08,	I_HIGH},
		{"Start 1",		I_START1,	0x10,	I_HIGH},
		{"Start 2",		I_START2,	0x20,	I_HIGH},
		{"Up2",			I_UP2,		0x40,	I_HIGH},
		{"Down2",		I_DOWN2,		0x80,	I_HIGH},
		}
	};

static InputPort Port5 =
	{
		{
		{"Left2",		I_LEFT2,		0x01,	I_HIGH},
		{"Right2",		I_RIGHT2,	0x02,	I_HIGH},
		{"Unknown",		0,				0x04,	I_HIGH},
		{"Unknown",		0,				0x08,	I_HIGH},
		{"Unknown",		0,				0x10,	I_HIGH},
		{"Unknown",		0,				0x20,	I_HIGH},
		{"Unknown",		0,				0x40,	I_HIGH},
		{"Unknown",		0,				0x80,	I_HIGH},
		}
	};

static highscore_t highscore[] =
	{
//	{0xB260,0x60,0x00,0x48},
	{0,-1}
	};

Csplat::Csplat()
{
SetName("splat");						//set romset name
SetScreen(304,256);
SetHighScoreInfo(highscore);
SetPort(0,&Port1);
SetPort(1,&Port2);
SetPort(2,&defenderPort3);
SetPort(3,&Port4);
SetPort(4,&Port5);
AddROM("splat.10",	0xD000,0x1000,0xd1a1f632,ROM_CPU1);
AddROM("splat.11",	0xE000,0x1000,0xca8cde95,ROM_CPU1);
AddROM("splat.12",	0xF000,0x1000,0x5bee3e60,ROM_CPU1);
AddROM("splat.01",	0x10000,0x1000,0x1cf26e48,ROM_CPU1);
AddROM("splat.02",	0x11000,0x1000,0xac0d4276,ROM_CPU1);
AddROM("splat.03",	0x12000,0x1000,0x74873e59,ROM_CPU1);
AddROM("splat.04",	0x13000,0x1000,0x70a7064e,ROM_CPU1);
AddROM("splat.05",	0x14000,0x1000,0xc6895221,ROM_CPU1);
AddROM("splat.06",	0x15000,0x1000,0xea4ab7fd,ROM_CPU1);
AddROM("splat.07",	0x16000,0x1000,0x82fd8713,ROM_CPU1);
AddROM("splat.08",	0x17000,0x1000,0x7dded1b4,ROM_CPU1);
AddROM("splat.09",	0x18000,0x1000,0x71cbfe5a,ROM_CPU1);
AddROM("splat.snd",	0xF000,0x1000,0xa878d5f3,ROM_CPU2);
AddROM("decoder.4",	0x0000,0x0200,0xe6631c23,ROM_PROM);
AddROM("decoder.6",	0x0200,0x0200,0x83faf25e,ROM_PROM);
}

CMachine *Csplat::CreateMachine()
{
return(new CWilliamsMachine());
}
